<template>
	<view>
		<image class="logo" src="../../static/logo.png"></image>
		<view >
			<!-- <view class="text-center baoming" >
				<view class="text-xsl padding">
					<text class=" cuIcon-roundcheckfill text-green "></text>
					<view class="padding text-xl text-green text-bold">报名成功</view>
				</view>
			</view> -->
			<view class="qrimg">
				<tki-qrcode  
				cid="qrcode" ref="qrcode" :val="val" :size="size" :icon="icon" :iconSize="iconsize" :onval="onval" :loadMake="loadMake" :showLoading="showLoading" :usingComponents="true"  />
			</view>
		</view>
		
		<view class="id-num">ID编号：{{mid}}</view>
		
		<view class="first-note note-msg">请长按二维码保存，便于签到使用</view>
		<view class="note-msg">如需修改登记资料，请<text class="goto" @tap="gotosignin">点击此处</text></view>
		
	</view>
</template>

<script>
	import tkiQrcode from "@/components/tki-qrcode/tki-qrcode.vue"
	export default {
		data() {
			return {
				mid : '',
				openid :'',
				val: '', // 要生成的二维码值
				size: 500, // 二维码大小
				onval: true, // val值变化时自动重新生成二维码
				loadMake: true, // 组件加载完成后自动生成二维码
				// icon: '../../static/logo2.png', // 二维码图标
				icon: '',
				iconsize: 70, // 二维码图标大小
				showLoading:false,
				iscompany: true
			}
		},
		onLoad(option) {
			this.val =option.mid;
			this.openid =option.openid;
			this.mid =option.mid;
			this.iscompany = option.iscompany
			this.companyCode = option.companyCode
		},
		methods: {
			creatQrcode() {
				this.val = this.member.mid;
				this.form_show = false;
			},
			// 回到表单页面，可修改表单信息
			gotosignin(){
				// 为 false 的时候是公司人员
				if(this.iscompany == 'false') {
					uni.navigateTo({
					    url: '../checkin/checkin?openid='+this.openid + '&companyCode=' + this.companyCode + '&iscompany=false'
					});
				}else{
					uni.navigateTo({
					    url: '../checkin/checkin?openid='+this.openid
					});
				}
				
			}
		},
		components: {tkiQrcode},
	}
</script>

<style>
	.logo{
		padding-top: 30px;
		display: block;
		width: 382.03rpx;
		height: 82.03rpx;
		margin: 0 auto;
	}
	.qrimg {
		display: flex;
		justify-content: center;
		margin-top: 50px;
		margin-bottom: 30px;
	}
	.id-num{
		text-align: center;
		color: #eb6100;
	}
	.first-note{
		margin-top: 65px;
	}
	.note-msg{
		margin-bottom: 8px;
		text-align: center;
		color: #555;
	}
	
	.goto{
		text-decoration: underline;
		color: #eb6100;
	}
</style>
